const express = require('express');
const router = express.Router();
const announcementController = require('../controllers/announcement.controller');

// 获取所有公告
router.get('/', announcementController.getAllAnnouncements);

// 获取单个公告
router.get('/:id', announcementController.getAnnouncementById);

// 创建公告
router.post('/', announcementController.createAnnouncement);

// 更新公告
router.put('/:id', announcementController.updateAnnouncement);

// 删除公告
router.delete('/:id', announcementController.deleteAnnouncement);

module.exports = router;